package com.junlt.p2p.httpmanage.simplehttp;

import com.junlt.p2p.entity.BaseResultEntity;
import com.junlt.p2p.entity.InvestListBean;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PartMap;
import retrofit2.http.Url;

/**
 * Created by tj on 2018/1/4.
 */

public interface HttpPostService {

    @Headers({"Content-Type: application/json","Accept: application/json"})//需要添加头
    @POST("message/searchInvestList")
    Observable<BaseResultEntity<List<InvestListBean>>> getHomeList(@Body RequestBody route);//传入的参数为RequestBody

    @Multipart
    @POST()
    Observable<ResponseBody> uploadFiles(
            @Url String url,
            @PartMap() Map<String, RequestBody> maps);

}
